package com.cn.gz.liwy.datatype;

import com.cn.gz.liwy.constan.StaticFinal;

public class MyDouble extends DataTypeBase implements DataType{

    private double double64;

    private Double aDouble;

    public MyDouble(){
        setTypeName("double");
        setTypeSize(size());
        setTypeValueRange(valueRange());
        // byte转换为字符串  方法1
        setTypeDefaultVal(defaultValue());
        setTypePacketClass(packetClass());
        new MyDouble(this);
        out("============"+getTypeName()+"类型使用规则"+"============");
        commonlyUsed();
        illegalUsed();
        out("==================华丽丽的分割线==================");
    }

    public MyDouble (MyDouble MyDouble){
//        将初始好的子类以参数的形式传到父类有参构造
        super(MyDouble);
    }

    @Override
    public int size() {
        return Double.SIZE;
    }

    @Override
    public String valueRange() {
        return Double.MIN_VALUE + "~" +Double.MAX_VALUE;
    }

    @Override
    public String defaultValue() {
        return Double.toString(double64);
    }

    @Override
    public void commonlyUsed() {

    }

    @Override
    public void illegalUsed() {

    }

    @Override
    public String packetClass() {
        return ""+Double.class;
    }
}

